package com.zut.subject.common.enums;

import lombok.Getter;

@Getter
public enum CategoryTypeEnum {
    PRIMARY(1,"岗位大类"),
    SECOND(2,"二级分类");

    private Integer code;
    private String desc;

    CategoryTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static CategoryTypeEnum getByCode(int codeVal) {
        for (CategoryTypeEnum result : CategoryTypeEnum.values()) {
            if (result.code==codeVal){
                return result;
            }
        }
        return null;
    }

}
